<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title><{$cars.p_allname}>-<{$setting.title}></title>
		<meta content="<{$setting.keywords}>" name="keywords" />
		<meta content="<{$setting.description}>" name="description" />
		<link href="<{$weburl}>/templates/default/<{$setting.templates}>/css/car.css" rel="stylesheet" type="text/css"/>
		<script type="text/javascript" src="<{$weburl}>/templates/default/<{$setting.templates}>/js/jquery-1.7.1.min.js"></script>
		<script type="text/javascript" src="<{$weburl}>/templates/default/<{$setting.templates}>/js/jquery.SuperSlide.2.1.js"></script>
		<script type="text/javascript" src="<{$weburl}>/static/js/Validform_v5.3.2_min.js"></script>
		<script type="text/javascript" src="<{$weburl}>/static/js/laydate/laydate.js"></script>
		<script language="JavaScript">
			$(function() {
				//品牌选择
				$("#brand").change(function(){
					$.get("<{$weburl}>/index.php?mod=ajax&ajax=1", { 
						pid :  $("#brand").val() 
					}, function (data, textStatus){
						   $("#subbrand").html(data); // 把返回的数据添加到页面上
						}
					);
				});

				//表单验证
				$(".yuyueform").Validform({
					tiptype:3
				});

				//表单验证
				$(".xunjiaform").Validform({
					tiptype:3
				});

				$("div.car_tab ul li a").mouseover(function() {
					$(this).addClass("here").parent().siblings().children().removeClass("here");
					var index = $div_li.index(this);
					$("div.cartab_box > div").eq(index).show().siblings().hide();
				});
				$("#hits").load("<{$weburl}>/index.php?m=ajax&ajax=1&rentcarshit=1&id=<{$cars.p_id}>");
				$('#yuyue').on('click', function(){
					var yuyueindex =  $.layer({
						type: 1,
						title: '预约看车',
						shade: [0.5, '#000'],
						area: ['460px', 'auto'],
						page: {dom: '#A1'}
					});
					$('#btnYuyueLookCar').unbind('click').on('click', function(){
						$("#A1 input[name='name']").siblings().remove();
						$("#A1 input[name='ordertime']").siblings().remove();
						$("#A1 input[name='mobilephone']").siblings().remove();
						$("#A1 textarea[name='orderinfo']").siblings().remove();
						if($("#A1 input[name='name']").val()==""){
							$("#A1 input[name='name']").after('<span class="Validform_checktip Validform_wrong">请填写姓名！</span>');
							return false;
						}
						else{
							$("#A1 input[name='name']").after('<span class="Validform_checktip Validform_right">通过信息验证！</span>');
						}
						if($("#A1 input[name='ordertime']").val()==""){
							$("#A1 input[name='ordertime']").after('<span class="Validform_checktip Validform_wrong">请选择预约时间！</span>');
							return false;
						}
						else{
							$("#A1 input[name='ordertime']").after('<span class="Validform_checktip Validform_right">通过信息验证！</span>');
						}
						if($("#A1 input[name='mobilephone']").val()==""){
							$("#A1 input[name='mobilephone']").after('<span class="Validform_checktip Validform_wrong">请填写手机号！</span>');
							return false;
						}
						else{
							$("#A1 input[name='mobilephone']").after('<span class="Validform_checktip Validform_right">通过信息验证！</span>');
						}
						if($("#A1 textarea[name='orderinfo']").val()==""){
							$("#A1 textarea[name='orderinfo']").after('<span class="Validform_checktip Validform_wrong">请填写留言！</span>');
							return false;
						}
						else{
							$("#A1 textarea[name='orderinfo']").after('<span class="Validform_checktip Validform_right">通过信息验证！</span>');
						}
						$.post("<{$weburl}>/index.php?m=ajax&ajax=1&yuyue=1&isrentcar=1",{
							pid: <{$cars.p_id}>, 
							uid: <{$cars.uid}>, 
							name: $("#A1 input[name='name']").val(), 
							mobilephone: $("#A1 input[name='mobilephone']").val(),
							ordertime: $("#A1 input[name='ordertime']").val(),
							orderinfo:$("#A1 textarea[name='orderinfo']").val()
						},function(data){
							if (data==1)
							{
								layer.close(yuyueindex);
								layer.alert("预约成功！请耐心等待商家和您联系！", 9);
								$('#yuyueform')[0].reset();
								$("#A1 input[name='name']").siblings().remove();
								$("#A1 input[name='ordertime']").siblings().remove();
								$("#A1 input[name='mobilephone']").siblings().remove();
								$("#A1 textarea[name='orderinfo']").siblings().remove();
							}
							else{
								layer.close(yuyueindex);
								layer.alert("预约失败！请再次预约！", 9);
								$("#A1 input[name='name']").siblings().remove();
								$("#A1 input[name='ordertime']").siblings().remove();
								$("#A1 input[name='mobilephone']").siblings().remove();
								$("#A1 textarea[name='orderinfo']").siblings().remove();
							}
						});
					});
				});
				$('#xunjia').on('click', function(){
					 var xunjiaindex = $.layer({
						type: 1,
						title: '咨询底价',
						shade: [0.5, '#000'],
						area: ['460px', 'auto'],
						page: {dom: '#B1'}
					});
					$('#btnxuejia').on('click', function(){
						$("#B1 input[name='name']").siblings().remove();
						$("#B1 input[name='mobilephone']").siblings().remove();
						if($("#B1 input[name='name']").val()==""){
							$("#B1 input[name='name']").after('<span class="Validform_checktip Validform_wrong">请填写姓名！</span>');
							return false;
						}
						else{
							$("#B1 input[name='name']").after('<span class="Validform_checktip Validform_right">通过信息验证！</span>');
						}
						if($("#B1 input[name='mobilephone']").val()==""){
							$("#B1 input[name='mobilephone']").after('<span class="Validform_checktip Validform_wrong">请填写手机号！</span>');
							return false;
						}
						else{
							$("#B1 input[name='mobilephone']").after('<span class="Validform_checktip Validform_right">通过信息验证！</span>');
						}

						$.post("<{$weburl}>/index.php?m=ajax&ajax=1&xunjia=1&isrentcar=1",{
							pid: <{$cars.p_id}>, 
							uid: <{$cars.uid}>, 
							name: $("#B1 input[name='name']").val(), 
							mobilephone: $("#B1 input[name='mobilephone']").val(),
						},function(data){
							if (data==1)
							{
								layer.close(xunjiaindex);
								layer.alert("询价成功！请耐心等待商家和您联系！", 9);
								$('#xunjiaform')[0].reset();
								$("#B1 input[name='name']").siblings().remove();
								$("#B1 input[name='mobilephone']").siblings().remove();
							}
							else{
								layer.close(xunjiaindex);
								layer.alert("询价失败！请再次询价！", 9);
								$("#B1 input[name='name']").siblings().remove();
								$("#B1 input[name='mobilephone']").siblings().remove();
							}
						});
					});
				});
			})
		</script>
		</head>
	<body>
<!--内容--> 
<{include file="default/`$setting.templates`/head.html"}>
<div class="nav">您当前的位置：<a href="<{$weburl}>/">首页</a> <span>></span> <a href="<{$weburl}>/index.php?m=rentcar">租车</a></div>
<div class="main mt10">
	<div class="carbox clearfix">
		<div class="carbox_left">
			<div class="carpicbox">
				<{if $cars.p_mainpic<>""}>
				<img src="<{$weburl}><{$cars.p_mainpic}>" id="BigImg"/>
				<{else}>
				<img src="<{$weburl}>/static/img/bigcar.jpg"/>
				<{/if}>
			</div>
			<{if $pic_list neq ""}>
			<div class="ladyScroll">
				<a class="prev" href="javascript:void(0)"></a>
				<div class="scrollWrap">
					<div class="dlList">
						<{foreach from=$pic_list item=piclist}>
						<dl>
							<dt><img src="<{$weburl}><{$piclist.smallpic}>" onmousemove="javascript:document.getElementById('BigImg').src='<{$weburl}><{$piclist.pic}>'"></dt>
						</dl>
						<{/foreach}>
					</div>
				</div>
				<a class="next" href="javascript:void(0)"></a>
			</div>
			<script type="text/javascript">
				jQuery(".ladyScroll").slide({ mainCell:".dlList", effect:"leftLoop",vis:5, autoPlay:true});
			</script>
			<{/if}>
		</div>
		<div class="carbox_right">
			<div class="carname"><{$cars.p_title}></div>
			<div class="rentcarname">车型：<{$cars.p_allname}></div>
			<p class="gray01 mt20"><span class="fr">点击：<span class="orange01" id="hits"></span></span>发布日期：<{$cars.listtime}></p>
			<div class="detail01 mt10">
				<ul class="clearfix">
					<li class="li01 mb10">价格：<span class="price"><{$cars.dayprice}></span> 元/天 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="price"><{$cars.monthprice}></span> 元/月</li>
				</ul>
				<div class="contactbox">
					<div class="telbox">
						<i></i>
						<{if $setting.version==1}>
							<p class="tel"><span class="fb"><{$setting.tel}></span></p>
							<p class="tel"><{$setting.contactman}></p>
						<{else}>
							<{if $cars.uid==0}>
								<p class="tel"><span class="fb"><{$cars.p_tel}></span></p>
								<p class="tel"><{$cars.p_username}></p>
							<{else}>
								<p class="tel"><span class="fb"><{$shop.mobilephone}></span> <{if $shop.isdealer==2}>（商家车源）<{/if}></p>
								<p class="tel"><{$shop.nicname}></p>
							<{/if}>
						<{/if}>
					</div>
				</div>
				<div class="mt20 clearfix">
					<span class="button_orange h35-p25 mr5"><a href="javascript:;" id="yuyue">预约看车</a></span> 
					<span class="button_gray h35-p25 "><a href="javascript:;" id="xunjia">咨询底价</a></span>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="main mt20 clearfix">
	<div class="main_left">
		<div class="cardetailbox">
			<ul class="title_tab">
				<li class="here"><a href="#B">车主描述</a></li>
				<li><a href="#D">大图展示</a></li>
			</ul>
			<div class="box">
				<h3 id="B"><span class="title">车主描述</span></h3>
				<div class="p20 cardetail">
					<{$cars.p_details}>
				</div>
				<{if $pic_list neq ""}>
				<h3 id="D"><span class="title">大图展示</span></h3>
				<div class="p20">
					<{foreach from=$pic_list item=piclist}>
					<p class="tc mt10"><img src="<{$weburl}><{$piclist.pic}>"></p>
					<{/foreach}>
				</div>
				<{/if}>
			</div>
		</div>
	</div>
	<div class="main_right">
		<{if $shop.isdealer==2 and $setting.version<>1}>
		<div class="shopbox mb10">
			<h3><{$shop.company}></h3>
			<div class="box">
				<{if $shop.logo<>''}><div class="logo"><img src="<{$shop.logo}>"></div><{/if}>
				<ul class="shopcontact">
					<li><strong>电话：</strong><{$shop.mobilephone}></li>
					<li><strong>地址：</strong><{$shop.address}></li>
				</ul>
				<div class="cyssbut">
					<span class="button_gray w200-h35"><a target="_blank" href="<{$weburl}>/index.php?m=shop&id=<{$shop.id}>">进入商家店铺</a></span> 
				</div>
			</div>
		</div>
		<{/if}>
		<div class="commonbox01">
			<h3><span class="title">同车系其他车源</span></h3>
			<div class="box">
				<ul class="carlist clearfix">
					<{foreach from=$samecar key=skey item=recomcarlist}>
					<li>
						<a href="<{$recomcarlist.p_url}>" target="_blank"><{if $recomcarlist.p_mainpic<>""}><img src="<{$recomcarlist.p_mainpic}>"/><{else}><img src="<{$weburl}>/static/img/car.jpg"/><{/if}></a>
						<p class="mt10"><a href="<{$recomcarlist.p_url}>" target="_blank"><{$recomcarlist.p_shortname}></a></p>
						<p class="gray01"><span class="orange01 fb fr"><{$recomcarlist.p_price}></span><{$recomcarlist.p_year}>年<{$recomcarlist.p_month}>月上牌</p>
					</li>
					<{/foreach}>
				</ul>
			</div>
		</div>
		<div class="commonbox01 mt10">
			<h3><span class="title">同价位其他车源</span></h3>
			<div class="box">
				<ul class="carlist clearfix">
					<{foreach from=$samepricecars key=skey item=recomcarlist}>
					<li>
						<a href="<{$recomcarlist.p_url}>" target="_blank"><{if $recomcarlist.p_mainpic<>""}><img src="<{$recomcarlist.p_mainpic}>"/><{else}><img src="<{$weburl}>/static/img/car.jpg"/><{/if}></a>
						<p class="mt10"><a href="<{$recomcarlist.p_url}>" target="_blank"><{$recomcarlist.p_shortname}></a></p>
						<p class="gray01"><span class="orange01 fb fr"><{$recomcarlist.p_price}></span><{$recomcarlist.p_year}>年<{$recomcarlist.p_month}>月上牌</p>
					</li>
					<{/foreach}>
				</ul>
			</div>
		</div>
	</div>
</div>
<div id="A1" class="hide">
	<div class="popnotice">
		<{$cars.p_allname}>，售价<{$cars.p_price}>，<{$cars.p_year}>年上牌，行驶<{$cars.p_kilometre}>万公里
	</div>
	<div class="p20">
	<form method="post" name="yuyueform" id="yuyueform" class="yuyueform">
		<table class="poptable">
		<tr>
			<th><span class="red">*</span> 姓名：</th>
			<td><input type="text" name="name" datatype="s" nullmsg="请填写姓名！"></td>
		</tr>
		<tr>
			<th><span class="red">*</span> 手机号：</th>
			<td><input type="text" name="mobilephone" datatype="m" nullmsg="请填写手机号！"></td>
		</tr>
		<tr>
			<th><span class="red">*</span> 预约时间：</th>
					<td><input type="text" class="laydate-icon" name="ordertime" datatype="*" nullmsg="请选择预约时间！" onclick="laydate()"></td>
		</tr>
		<tr>
			<th><span class="red">*</span> 留言：</th>
			<td><textarea name="orderinfo" rows="5" cols="25" datatype="*" nullmsg="请填写留言！"></textarea></td>
		</tr>
		<tr>
			<th></th>
			<td class="gray">您的信息不会在网站上显示，我们将保证您的隐私安全。</td>
		</tr>
		<tr>
			<th></th>
			<td><span class="button_orange h35-p25 mr5"><a id="btnYuyueLookCar" href="javascript:;">提交</a></span></td>
		</tr>
		</table>
	</form>
	</div>
</div>
<div id="B1" class="hide">
	<div class="popnotice">
		<{$cars.p_allname}>，售价<{$cars.p_price}>，<{$cars.p_year}>年上牌，行驶<{$cars.p_kilometre}>万公里
	</div>
	<div class="p20">
		<form method="post" name="xunjiaform" id="xunjiaform" class="xunjiaform">
		<table class="poptable">
		<tr>
			<th><span class="red">*</span> 姓名：</th>
			<td><input type="text" name="name" datatype="s" nullmsg="请填写姓名！"></td>
		</tr>
		<tr>
			<th><span class="red">*</span> 手机号：</th>
			<td><input type="text" name="mobilephone" datatype="m" nullmsg="请填写手机号！"></td>
		</tr>
		<tr>
			<th></th>
			<td class="gray">您的信息不会在网站上显示，我们将保证您的隐私安全。</td>
		</tr>
		<tr>
			<th></th>
			<td><span class="button_orange h35-p25 mr5"><a id="btnxuejia" href="javascript:;">提交</a></span></td>
		</tr>
		</table>
		</form>
	</div>
</div>
<{include file="default/`$setting.templates`/foot.html" }>
</body>
</html>

